{layout name="public/layout" /}
<div class="main">
    {if $op=='display'}
        <form  action="#" method="get" class="form-horizontal" role="form">
            {loop $all_soft_type $group_i $row}
                <div class="form-group">
                    <div class="col-sm-11">
                        <div class="btn-group">
                            <a href="#"  class="btn btn-primary">
                                {$row['name']}
                            </a>
                            {loop $row['list'] $list_i $item}
                              <a href="{php echo createWebUrl('yxmodule',array('op' => 'display','softmode'=>$item['field']))}"  class="btn {if $softmode == $item['field']}btn-primary{else}btn-default{/if}">{$item['name']}<span style="color: #ff0000">{$item['count']}</span></a>
                            {/loop}
                        </div>
                    </div>
                </div>
            {/loop}
        </form>
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title" >
                <li style="font-size: 16px" {if $op == 'display' &&  $datatype!='going_num' && $datatype!='void_num'}class="layui-this"{/if} ><a href="{php echo createWebUrl('yxmodule',array('op' => 'display','datatype'=>'all'))}"> 最新活动</a></li>
<!--                <li style="font-size: 16px" {if $op == 'display' &&  $datatype=='all' &&  $sort=='id'}class="layui-this"{/if} ><a href="{php echo createWebUrl('yxmodule',array('op' => 'display','datatype'=>'all','sort'=>'id'))}"> 全部活动【{$all_data.total}】</a></li>-->
                <li style="font-size: 16px" {if $op == 'display' &&  $datatype=='going_num'}class="layui-this"{/if} ><a href="{php echo createWebUrl('yxmodule',array('op' => 'display','datatype'=>'going_num'))}">进行中【{$all_data.going_num}】</a></li>
                <li style="font-size: 16px" {if $op == 'display' &&  $datatype=='void_num'}class="layui-this"{/if}><a href="{php echo createWebUrl('yxmodule',array('op' => 'display','datatype'=>'void_num'))}" >空位【{$all_data.void_num}】</a></li>
                <div style="position: absolute;top:3px;right: 10px">
                    {if $_G['system']['s']['isaddtheme'] == 1 && $all_data['void_num'] < 5}
                      <a class="btn btn-info" href="{php echo createWebUrl('yxmodule',array('op' => 'add_modules'))}">添加空位</a>
                    {/if}
                </div>
            </ul>
            <div class="layui-tab-content" >
                <div class="layui-tab-item layui-show">
                        <table class="table table-hover">
                            <thead class="navbar-inner">
                            <tr>
                                <th style="width:60px;">编号</th>
                                <th >标题</th>
                                <th style="width:100px;">{if $is_yixuan==1}模式{else}对接{/if}</th>
                                <th >功能</th>
                                <th style="text-align: right;">粉丝</th>
                                <th style="text-align: right;">浏览量</th>
                                <th style="text-align: right;">付款金额</th>
                                <th style="text-align: right;">红包</th>
                                <th style="padding-left: 30px;">销售</th>
                                <th >客服</th>
                                <th style="width:70px; text-align:right;">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {loop $list $i $item}
                            <tr>
                                <td><a style="font-size: 16px;" href="{php echo createWebUrl('theme', array('op'=>'display','cw'=>'home','m'=>$item['module_name']));}"><span class="btn btn-sm btn-default" >{$item['module_name']}{if $_P['datatype']!='void_num'}-{$item['themeid']}{/if}</span></a></td>
                                <td>{$item['title']}</td>
                                <td>{$item['softmode_tip']}</td>
                                <td >{$item['soft_tips']}</td>
                                <td style="text-align: right;"><span class="label label-primary">{$item['fanscount']}</span></td>
                                <td style="text-align: right;"><span class="label label-success">{$item['scansum']}</span></td>
                                <td style="text-align: right;"><span class="label label-info">{$item['allfee']}</span></td>
                                <td style="text-align: right;">{if $item['fenxiao']!='0.00'}<span class="label label-danger">{$item['fenxiao']}</span>{/if}</td>
                                <td style="padding-left: 30px;">{$item['xiaoshou']}</td>
                                <td>{$item['kefu']}</td>
                                <td style="text-align:right;">
                                    <div class="btn-group">
                                        <a class="btn btn-info btn-sm" href="{php echo createWebUrl('theme', array('op'=>'display','cw'=>'home','m'=>$item['module_name']));}"><i class="icon-edit"></i>进入活动</a>
                                    </div>
                                </td>
                            </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
            </div>
        </div>
    {$pager}
    {/if}
</div>
<script type="text/javascript">
    function jump(){
        layer.msg('正在准备下载');
    }
    function submitForm(){
        var form = document.getElementById("myform");
        form.submit();
    }
</script>
